package org.csu.mypetstore.service;

import org.csu.mypetstore.domain.Orders;
import org.csu.mypetstore.persistence.OrderDao;
import org.csu.mypetstore.persistence.impl.OrderDaoImpl;

import java.util.List;

public class OrderService {
    OrderDao orderDao;
    public OrderService()
    {
        orderDao=new OrderDaoImpl();
    }
    public List<Orders> getOrderByUsername(String userid)
    {
        return orderDao.getOrderByUsername(userid);
    };
    public Orders getOrder(String i)
    {
        return orderDao.getOrder(i);
    }
    public void insertOrder(Orders orders)
    {
        orderDao.insertOrder(orders);
    }
    public void insertOrderStatus(Orders orders)
    {
        orderDao.insertOrderStatus(orders);
    }
    public boolean selectOrderList(Orders orders)
    {
       return orderDao.selectOrderList(orders);
    }
    void updateOrders(Orders orders)
    {
        orderDao.updateOrders(orders);
    }

}
